package com.example.exception;

public class ExceptionTest3 {
    public static void main(String[] args) {
        check(-1);
    }

    public static void check(int num) {
        if (num < 0) {
            throw new MyException("你输入的是非法数据");
        }
    }
}
